﻿<h2 class="tab-cont-h2">
	<a href="javascript:;">标单管理</a> > <span>历史标单</span>
 </h2>
<div class="nav-search">
    <div class="col">
        <label class="nav-label">标书编号</label>
        <div class="inputbg">
            <input type="text" class="input" id="Bid_No">
        </div>
    </div>
    <div class="col">
        <label class="nav-label">订单编号</label>
        <div class="inputbg">
            <input type="text" class="input" id="OrderNumber">
        </div>
    </div>
    <div class="col">
        <label class="nav-label">标书状态</label>
        <div class="inputbg">
            <select class="select" id="State">
                <option value="0">全部</option>
                <option value="1">等待开始</option>
                <option value="30">竞标中</option>
                <option value="40">竞标结束</option>
                <option value="50">竞标失败</option>
                <option value="105">未取货</option>
                <option value="110">取货成功</option>
                <option value="115">到货确认</option>
                <option value="120">成功接收回单</option>
                <option value="150">结款</option>
                <option value="1">删除</option>
            </select>
        </div>
    </div>
    <div class="col">
        <label class="nav-label">结标状态</label>
        <div class="inputbg">
            <select class="select" id="Del_Flag">
                <option value="0">全部</option>
                <option value="1">正常</option>
                <option value="10">废标</option>
                <option value="20">流标</option>
            </select>
        </div>
    </div>
    <div class="col">
        <label class="nav-label">中标企业</label>
        <div class="inputbg">
            <input type="text" class="input" id="Wuliu_Name">
        </div>
    </div>
    <div class="col col1 ">
        <label class="nav-label">开标时间</label>
        <div class="inputbg">
            <input type="text" class="input start datepicker" id="State_Bid_Time1"> --
            <input type="text" class="input end datepicker" id="State_Bid_Time2">
        </div>
    </div>
    <div class="col col1 ">
        <label class="nav-label">结标时间</label>
        <div class="inputbg">
            <input type="text" class="input start datepicker" id="End_Bid_Time1"> --
            <input type="text" class="input end datepicker" id="End_Bid_Time2">
        </div>
    </div>
    <input type="hidden" id="page" value="1" />
    <a href="javascript:;" class="btn btn-primary" id="query">查询</a>

</div>
<div class="" id="HistorytabCon">
  
</div>
<nav class="page-nav">
        <ul class="pagination" id="demo"></ul>
    </nav>


<!--修改弹框-->
<div class="modal fade model editItemmodel" id="editcopybidItemModel" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document" style="width:1000px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="copydataTitle">复制标单</h4>
            </div>
            <div class="modal-body">
                 <form class="additem" id="editcopybiditemForm">
        
                 </form>
            </div>
        </div>
    </div>
</div>



<script type="text/template" id="editcopybiditemTmp">
    <div class="form">
            <div class="group">
                <label class="l-label">取 货 地：</label>
                <div class="l-area">
                    <div class="col1">
                        <select class="select select1" data-name="editprovince" id="editstart_pro_id">
                        </select>
                        <select class="select select1" data-name="editcity" id="editstart_city_id">
                        </select>
                        <select class="select  select1" data-name="edittown" id="editstart_town_id">
                        </select>
                    </div>
                    <div class="col1">
                        <input class="input input2" placeholder="详细地址" id="editstart_address" name="editstart_address" value="<%=start_address%>">
                        <label class="s-label">取货时间：</label>
                        <span style="position: relative; z-index: 9999;"><input class="input input3 datepicker" id="editconsignee_time" name="editconsignee_time" value="<%=consignee_time%>" data-date-format="yyyy-mm-dd hh:ii"></span>
                    </div>
                </div>
            </div>
            <div class="group" data-name="receipt">
                <label class="l-label">收 货 地：</label>
                <div class="l-area">
                    <div class="col1">
                        <select class="select select1" data-name="editprovince" id="editend_pro_id">
                            
                        </select>
                        <select class="select select1" data-name="editcity" id="editend_city_id">
                           
                        </select>
                        <select class="select select1" data-name="edittown" id="editend_town_id">
                          
                        </select>
                    </div>
                    <div class="col1">
                    <input class="input input2" placeholder="详细地址" id="editend_address" name="editend_address" value="<%=end_address%>">
                        <label class="s-label">到货时间：</label>
                        <input class="input input3 datepicker" id="editreceipt_time" name="editreceipt_time" value="<%=receipt_time%>" data-date-format="yyyy-mm-dd hh:ii">
                    </div>
                    <div class="col1 none">
                        <select class="select select2" id="editstart_receipt_hour">
                        </select>时 －
                        <select class="select select2" id="editend_receipt_hour">
                        </select>时
                    </div>
                </div>
            </div>
            <div id="receiptAdd" data-isset="0">
                <input type="hidden" id="editend_city_id2" name="editend_city_id2" />
                <input type="hidden" id="editend_city_name2" name="editend_city_name2" />
                <input type="hidden" id="editend_address2" name="editend_address2" />
            </div>
            <div class="group">
                <label class="l-label">开标时间：</label>
                <div class="l-area">
                    <input class="input input1 datepicker " id="editstart_bid_time" name="editstart_bid_time" value="<%=start_bid_time%>" data-date-format="yyyy-mm-dd hh:ii">
                </div>
            </div>
            <div class="group">
                <label class="l-label">结束时间：</label>
                <div class="l-area">
                    
                    <label class="l-radio">
                        <input type="radio" name="editend_bid_time" value="" checked>其他时间
                        <input type="text" class="input input4 datepicker" id="editendbid_other" style="width:157px;" value="<%=end_bid_time%>">
                    </label>
                </div>
            </div>
            <div class="group">
                <label class="l-label">货物属性：</label>
                <div class="l-area">
                    <label class="l-radio">
                        <input type="radio" name="editdanger" value="1" <%if(danger==1){%>checked<%}%>>普通
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="editdanger" value="50" <%if(danger==50){%>checked<%}%>>半危险品
                    </label>
                    <label class="l-radio">
                        <input type="radio" name="editdanger" value="100" <%if(danger==100){%>checked<%}%>>危险品
                    </label>
                </div>
            </div>
            <div class="group">
                <label class="l-label">物品资质：</label>
                <div class="l-area">
                    <select class="select select3" id="editwuliu_type" name="editwuliu_type">
                        <option value="1" text=0 <%if(wuliu_type==0){%>selected="selected"<%}%>>普通货物承载</option>
                        <option value="10" text=1 <%if(wuliu_type==1){%>selected="selected"<%}%>>危险品货物承载</option>
                    </select>
                </div>
            </div>
            <div class="group">
                <label class="l-label">ERP编号：</label>
                <div class="l-area">
                    <input class="input input5" id="editnumber" name="editnumber" value="<%=number%>">
                </div>
            </div>
            <div class="group">
                <label class="l-label">详情描述：</label>
                <div class="l-area">
                    <textarea placeholder="请限制在1000字以内..." id="editinformation" name="editinformation" class="textarea textarea1"><%=information%></textarea>
                </div>
            </div>
            <div class="group">
                <label class="l-label">联 系 人：</label>
                <div class="l-area">
                    <select class="select select3" id="editcontacts">
                        
                    </select>
                </div>
            </div>
            <div class="group">
                <label class="l-label">备注信息：</label>
                <div class="l-area">
                    <textarea placeholder="请限制在500字以内..." class="textarea textarea2" name="editremark" id="editremark"><%=remark%></textarea>
                </div>
            </div>
            <div class="group">
                <label class="l-label">销售人员：</label>
                <div class="l-area">
                    <select class="select select3" id="editstaff" name="editstaff">
                    </select>
                </div>
            </div>
        </div>
        <div class="btn-area">
           <%if(!!bool){%>
            <input type="submit" id="editbtnSure" class="btn sure" value="确定">
            <a href="javascript:;" id="editbtnCancel" class="btn cancel" onclick=" window.location.reload();" data-dismiss="modal" aria-label="Close">取消</a>
            <%}%>
        </div>
</script>

<script type="text/javascript" src="jquery.validate.min.js"></script>
<script type="text/javascript" src="bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

<script type="text/javascript" src="jqPaginator.js" charset="UTF-8"></script>
<script src="standard_history.js"></script>
<script type="text/template" id="HistorylistTpl">
    <table class="table table-hover table-responsive">
        <tr class="thead">
            <td class="td1">标书编码</td>
            <td class="td2">订单编号</td>
            <td class="td3">开标时间</td>
            <td class="td4">结标时间</td>
            <td class="td5">收货地</td>
            <td class="td6">中标企业</td>
            <td class="td7">标书状态</td>
            <td class="td7">操作</td>
        </tr>
        <tr class="trh7">
            <td class="" colspan="10">
                <input type="hidden" id="TotalNum" value="<%=obj.TotalNum%>">
            </td>
        </tr>
        <%if(obj.Items.length>0){%>
        <%_.each(obj.Items,function(item,i){%>
        <tr class="tbody tbody-<%=(i%2==0 ? 1 :2)%>">
            <td class="td1"><a href="javascript:;" class="bid-no" data-id="<%=item.bid_id%>"><%=item.bid_no%></a></td>
            <td class="tdtextal"><%=item.number%></td>
            <td class=""><%=item.start_bid_time%></td>
            <td class=""><%=item.end_bid_time%></td>
            <td class="tdtextal"><%=item.end_city_name+item.end_address%></td>
            <td><%=item.wuliu_name%></td>
            <td class="">
            <%if(item.del_flag==1){%>
                        <%if(item.state==1){%>
                          新增标书
                          <%}else if(item.state==30){%>
                              竞标中
                        
                          <%}else if(item.state==40){%>
                              竞标结束
                       
                          <%}else if(item.state==100){%>
                              等待取货
                         
                          <%}else if(item.state==105){%>
                              未取货
                        
                          <%}else if(item.state==110){%>
                              取货成功
                        
                          <%}else if(item.state==115){%>
                              到货确认
                        
                          <%}else if(item.state==120){%>
                              回单确认
                        
                          <%}else if(item.state==150){%>
                              已结款
                          <%}else if(item.state==-1){%>
                              删除
                          <%}%>
            <%}else if(item.del_flag==10){%>
            废标
            <%}else if(item.del_flag==20){%>
            流标
            <%}%>
                    </td>
                    <td class=""><a href="javascript:;"  class="copybillModel"  data-bid="<%=item.bid_id%>">复制标单</a></td>
        </tr>
        <%})%>
 <%}else{%>
               <tr><td colspan="9" style="text-align:center;">暂无数据</td></tr>
            <%}%>
    </table>
    
</script>
